<!--?xml version="1.0" encoding="UTF-8"?--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Git学习三：版本回退</title>
 </head>
 <body>
  <div>
   1：回退命令
  </div>
  <div>
   <div style="box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902);-en-codeblock:true;">
    <div>
     <span style="font-family: Monaco; color: rgb(51, 51, 51); caret-color: rgb(51, 51, 51); font-size: 12px;">git reset head</span>
    </div>
    <div>
     <font face="Monaco">git reset -hard commit_id</font>
    </div>
    <div>
     <font face="Monaco">Git reset -hard Head^</font>
    </div>
   </div>
  </div>
  <div>
   <br />
  </div>
  <div>
   2：文件删除
  </div>
  <div style="box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902);-en-codeblock:true;">
   git rm file_name
  </div>
  <div>
   <br />
  </div>
 </body>
</html>